package com.szqhyxj.youxiangju.biz.personalInformation;

import com.google.gson.annotations.SerializedName;
import com.szqhyxj.youxiangju.sys.BaseResult;
import com.szqhyxj.youxiangju.sys.RetrofitFacade;

import io.reactivex.Observable;
import retrofit2.http.POST;

/**
 * Created by leung on 2018/10/30.
 */

public class PersonalInformationModel {

    public interface PersonalInformationService {
        @POST("user/info/personalDetail")
        Observable<BaseResult<PersonalInformationEntity>> personalInformation();
    }

    public static Observable<BaseResult<PersonalInformationEntity>> getpersonalInformation() {
        return RetrofitFacade.Companion.getRetrofit().create(PersonalInformationService.class).personalInformation();
    }


    public static class PersonalInformationEntity {

        @SerializedName("inviteName")
        private String inviteName;

        @SerializedName("realNameAuthStatus")
        private int realNameAuthStatus;

        @SerializedName("inviterPhone")
        private String phone;

        @SerializedName("idCard")
        private String idCard;

        @SerializedName("avatar")
        private String avatar;

        @SerializedName("insuranceType")
        private int insuranceType;

        @SerializedName("useraccount")
        private String useraccount;

        @SerializedName("username")
        private String username;

        public void setInviteName(String inviteName){
            this.inviteName = inviteName;
        }

        public String getInviteName(){
            return inviteName;
        }

        public void setRealNameAuthStatus(int realNameAuthStatus){
            this.realNameAuthStatus = realNameAuthStatus;
        }

        public int getRealNameAuthStatus(){
            return realNameAuthStatus;
        }

        public void setPhone(String phone){
            this.phone = phone;
        }

        public String getPhone(){
            return phone;
        }

        public void setIdCard(String idCard){
            this.idCard = idCard;
        }

        public String getIdCard(){
            return idCard;
        }

        public void setAvatar(String avatar){
            this.avatar = avatar;
        }

        public String getAvatar(){
            return avatar;
        }

        public void setInsuranceType(int insuranceType){
            this.insuranceType = insuranceType;
        }

        public int getInsuranceType(){
            return insuranceType;
        }

        public void setUseraccount(String useraccount){
            this.useraccount = useraccount;
        }

        public String getUseraccount(){
            return useraccount;
        }

        public void setUsername(String username){
            this.username = username;
        }

        public String getUsername(){
            return username;
        }

        @Override
        public String toString(){
            return
                    "PersonInfoEntity{" +
                            "inviteName = '" + inviteName + '\'' +
                            ",realNameAuthStatus = '" + realNameAuthStatus + '\'' +
                            ",inviterPhone = '" + phone + '\'' +
                            ",idCard = '" + idCard + '\'' +
                            ",avatar = '" + avatar + '\'' +
                            ",insuranceType = '" + insuranceType + '\'' +
                            ",useraccount = '" + useraccount + '\'' +
                            ",username = '" + username + '\'' +
                            "}";
        }
    }
}
